<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006~2016 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
use think\Route;
Route::group('api',function(){
	// +----------------------------------------------------------------------
    // | banner
    // +----------------------------------------------------------------------
    Route::group('Index',function(){
        Route::post('banner','api/Index/banner');//banner图
    });

    // +----------------------------------------------------------------------
    // | 支付
    // +----------------------------------------------------------------------
    Route::group('pay',function(){
        Route::group('wechat',function(){
            Route::post('notify','api/pay/notify');//微信回调
            Route::post('refund/notify','api/pay/refund_return');//微信回调
        });
    });

    // +----------------------------------------------------------------------
    // | 地址
    // +----------------------------------------------------------------------
    Route::group('Address',function(){
        Route::post('address_list','api/Address/address_list');
        Route::post('address_edit','api/Address/address_edit');
        Route::post('address_setdefault','api/Address/address_setdefault');
        Route::post('address_del','api/Address/address_del');
    });

    // +----------------------------------------------------------------------
    // | 购物车
    // +----------------------------------------------------------------------
    Route::group('Cart',function(){
        Route::post('cartList','api/Cart/cartList');
        Route::post('cartAdd','api/Cart/cartAdd');
        Route::post('cartDel','api/Cart/cartDel');
        Route::post('cartUpdate','api/Cart/cartUpdate');
    });

    // +----------------------------------------------------------------------
    // | 需求全
    // +----------------------------------------------------------------------
    Route::group('Circle',function(){
        Route::post('circleSelect','api/Circle/circleSelect');
        Route::post('circleInfo','api/Circle/circleInfo');
        Route::post('circleCommentAdd','api/Circle/circleCommentAdd');
        Route::post('circleCommentDel','api/Circle/circleCommentDel');
        Route::post('circleLike','api/Circle/circleLike');
        Route::post('attention','api/Circle/attention');
        Route::post('attentionList','api/Circle/attentionList');
        Route::post('circleKeep','api/Circle/circleKeep');
        Route::post('circleKeepList','api/Circle/circleKeepList');
        Route::post('circleGoodsKeep','api/Circle/circleGoodsKeep');
        Route::post('goodsKeepList','api/Circle/goodsKeepList');
        Route::post('addCircle','api/Circle/addCircle');
        Route::post('addCircleGoods','api/Circle/addCircleGoods');
        Route::post('circleGoodsInfo','api/Circle/circleGoodsInfo');
        Route::post('goodsReview','api/Circle/goodsReview');
        Route::post('goodsReviewDel','api/Circle/goodsReviewDel');
        Route::post('addCircleimg','api/Circle/addCircleimg');
        Route::post('delCircleimg','api/Circle/delCircleimg');
        Route::post('deleteCircle','api/Circle/deleteCircle');
        Route::post('editGoodsImg','api/Circle/editGoodsImg');
    });

    // +----------------------------------------------------------------------
    // | 首页
    // +----------------------------------------------------------------------
    Route::group('Index',function(){
        Route::post('index','api/Index/index');
        Route::post('banner','api/Index/banner');
    });

    // +----------------------------------------------------------------------
    // | 用户
    // +----------------------------------------------------------------------
    Route::group('Member',function(){
        Route::post('buyerCheck','api/Member/buyerCheck');
        Route::post('headimagEdit','api/Member/headimagEdit');
        Route::post('memberInfo','api/Member/memberInfo');
    });

    // +----------------------------------------------------------------------
    // | 订单
    // +----------------------------------------------------------------------
    Route::group('Order',function(){
        Route::post('orderList','api/Order/orderList');
        Route::post('orderInfo','api/Order/orderInfo');
        Route::post('orderPreview','api/Order/orderPreview');
        Route::post('orderAdd','api/Order/orderAdd');
        Route::post('orderUpdate','api/Order/orderUpdate');
        Route::post('orderReturn','api/Order/orderReturn');
        Route::post('orderReturnImg','api/Order/orderReturnImg');
        Route::post('orderReturnUpdate','api/Order/orderReturnUpdate');
        Route::post('orderReturnList','api/Order/orderReturnList');
        Route::post('orderReturnInfo','api/Order/orderReturnInfo');
        Route::post('orderReview','api/Order/orderReview');
    });

    // +----------------------------------------------------------------------
    // | 个人详情
    // +----------------------------------------------------------------------
    Route::group('Personal',function(){
        Route::post('index','api/Personal/index');
        Route::post('userInfo','api/Personal/userInfo');
        Route::post('balance','api/Personal/balance');
        Route::post('wallet','api/Personal/wallet');
        Route::post('withdraw','api/Personal/withdraw');
        Route::post('walletWithdraw','api/Personal/walletWithdraw');
        Route::post('bindcard','api/Personal/bindcard');
        Route::post('bankdetail','api/Personal/bankdetail');
        Route::post('unbundling','api/Personal/unbundling');
    });

    // +----------------------------------------------------------------------
    // | 个人中心
    // +----------------------------------------------------------------------
    Route::group('System',function(){
        Route::post('agreement','api/System/agreement');
    });
});
